//Nathan Popham
//4003-573-01: Procedural Shading
//Lab 3: Task 1 
//
//opacityTexture
//  This shader applies a given texture's color channel to the opacity of 
//  the surface.
//
//  channel -- the texture color channel to use
//  texturename -- the texture to use

surface
opacityTexture (  float channel = 0.0; 
                  string texturename = "";)
                  
{
    float texOpacity = 1.0;

    if(texturename != "")
    {
        texOpacity = float texture(texturename);
    }

    Oi = Os * texOpacity;
    Ci = Cs * Oi;

}
